﻿using Knlght.Model.Sys;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Knlght.Mappings
{
    public class SysLogInfoMapping : EntityTypeConfiguration<LogInfo>

    {
        public SysLogInfoMapping()
        {
            // 设置表名
            this.ToTable("Sys"+nameof(LogInfo));
            //设置主键
            this.HasKey(a => a.Id);
            //不更新
            this.Property(t => t.AddTime).HasDatabaseGeneratedOption(DatabaseGeneratedOption.Computed);
            // 设置属性的类型和长度
            this.Property(a => a.Description).HasColumnType("NVarchar").HasMaxLength(1000);
           // this.Property(a => a.Account).HasColumnName("F" + nameof(LogInfo.Account));
        
        }    
    }

}
